import { defineStore } from "pinia";
import { ref } from "vue";
import { getCategoryAPI } from "@/apis/layout";


export const useCategoryStore = defineStore("category", () => {
    const categoryList = ref([]);
    const getCategoryList = async () => {
        const { result } = await getCategoryAPI();
        categoryList.value = result;
    };

    return {
        categoryList,
        getCategoryList,
    };
})